package com.chineseall.app.dao.mongo;

import jmind.core.mongodb.MongoCollection;
import jmind.resource.manager.ZKMongoManager;

import com.chineseall.rebirth.api.helper.Const;
import com.mongodb.BasicDBObject;

public class AppMongo extends MongoCollection {

    public AppMongo() {
        super(ZKMongoManager.getInstance().getResource("app"));
    }

    public static void main(String[] args) {
        Const.setEnvironment("review");
        new AppMachine().getColl().ensureIndex(new BasicDBObject("mid", 1), "mid", true);
        new AppMachine().getColl().ensureIndex(new BasicDBObject("uid", 1), "uid");
        new Location().getColl().ensureIndex(new BasicDBObject("loc", "2d"));
    }

}
